<?php

namespace App\Extends\Oss;

class OssConfig
{
    protected string $accessKey = '';

    protected string $secretKey = '';

    protected string $endpoint = 'oss-cn-beijing.aliyuncs.com';

    protected ?string $cdnHost = null;

    protected bool $useSsl = false;

    public function __construct(
        string $accessKey,
        string $secretKey,
        string $endpoint,
        ?string $cdnHost = null,
        bool $useSsl = false,
    ) {
        $this->accessKey = $accessKey;
        $this->secretKey = $secretKey;
        $this->endpoint = $endpoint;
        $this->cdnHost = $cdnHost;
        $this->useSsl = $useSsl;
    }

    public function getAccessKey(): string
    {
        return $this->accessKey;
    }

    public function setAccessKey(string $accessKey): static
    {
        $this->accessKey = $accessKey;

        return $this;
    }

    public function getSecretKey(): string
    {
        return $this->secretKey;
    }

    public function setSecretKey(string $secretKey): static
    {
        $this->secretKey = $secretKey;

        return $this;
    }

    public function getEndpoint(): string
    {
        return $this->endpoint;
    }

    public function setEndpoint(string $endpoint): static
    {
        $this->endpoint = $endpoint;

        return $this;
    }

    public function getCdnHost(): ?string
    {
        return $this->cdnHost;
    }

    public function setCdnHost(?string $cdnHost): static
    {
        $this->cdnHost = $cdnHost;

        return $this;
    }

    public function getUseSsl(): bool
    {
        return $this->useSsl;
    }

    public function setUseSsl(bool $useSsl): static
    {
        $this->useSsl = $useSsl;

        return $this;
    }
}
